1. Field of the Invention
The invention relates to the configuration of expansion devices, and more particularly, to a technique of configuring the expansion devices without the need for a separate storage device.
2. Description of the Related Art
The most popular expansion bus standard in the PC industry today is the Industry Standard Architecture (ISA). The ISA bus was first used in the PC/AT line of personal computers by International Business Machines Corporation (IBM). As a result of the immense popularity of ISA, a large number (thousands) of expansion cards and peripherals are available for ISA compatible personal computers. The ISA bus requires the allocation of memory and I/O address spaces, DMA channels and interrupt levels among multiple ISA expansion cards. However, ISA does not define a hardware or software mechanism for allocating these resources. Consequently, configuration of ISA cards is typically done with switches or jumpers that change the decode maps for memory and I/O space and steer the DMA and interrupt signals to different pins on the bus. In addition, system configuration files need to be updated to reflect the configuration changes. When more than one expansion card is placed onto an ISA bus, conflicts may arise as a result of the different resource requirements of the expansion cards. To address these potential conflicts, users had to refer to documentation provided by the expansion card manufactures. For the user, this configuration process was both time consuming and unreliable.
In a joint effort between Compaq Corporation, Intel Corporation, Microsoft Corporation and Phoenix Technologies Ltd., the Plug and Play standard was developed. The Plug and Play specification allows for the automatic configuration of Plug and Play expansion cards. Any conflict that may exist between different Plug and Play cards is automatically resolved by the system. In systems where both Plug and Play expansion cards and standard ISA cards are connected, the configuration needs to be augmented in the system BIOS and/or operating system to manage and arbitrate ISA bus resources.
The two key functions performed by the Plug and Play system BIOS are resource management and runtime configuration. The basic system resources, which include the DMA channels, interrupt request lines, and I/O and memory addresses, are allocated by the Plug and Play system BIOS in its resource management mode. Because there are thousands of expansion cards available, these system resources are commonly allocated in a conflicting manner in ISA systems, which can lead to bootstrap and system configuration failures. In its role as resource manager, the Plug and Play system BIOS configures the Plug and Play expansion cards before or during the Power On Self Test (POST) procedure. The main system board and other standard ISA cards are configured during the POST procedure. It is noted that the Plug and Play system BIOS performs the same POST requirements of existing ISA computer systems. During the Plug and Play configuration phase, the Plug and Play expansion cards provide their resource requirements to allow the system BIOS to perform resource allocation and conflict resolution. After the configuration procedure is complete, POST is executed. After the POST procedure is completed, control is transferred from the system BIOS to the operating system software. However, in its runtime configuration mode, the system BIOS does provide configuration services for system board devices after the POST procedure has finished. This feature allows the system BIOS to dynamically change the resources allocated to system board devices after the operating system has been loaded thereby allow the operating system software to manipulate the configuration of the system board devices.
A more detailed description of the procedure for configuring Plug and Play ISA expansion cards would be clearer when discussed in conjunction with FIGS. 1 and 2. Referring now to FIG. 1, the configuration steps executed by the Plug and Play system BIOS for Plug and Play expansion cards are shown. Upon power-up, all Plug and Play expansion cards detect a signal RESET.sub.-- DRV, which is asserted by a reset controller in the computer system during power-up to cause a hardware reset of the ISA expansion boards. Upon detection of the asserted signal RESET.sub.-- DRV, the Plug and Play expansion cards set their card select number (CSN) to the value 0, and enter into a WAIT FOR KEY state. The commands asserted by the system BIOS to the Plug and Play expansion cards are provided through three 8-bit I/O ports: an ADDRESS port, a WRITE.sub.-- DATA port and a READ.sub.-- DATA port. The expansion cards in the WAIT FOR KEY state do not respond to any access to their ports until an initiation key is detected. The initiation key is defined by a series of writes to the ADDRESS port of each expansion card. In step 100, if the proper series of I/O writes performed by the system BIOS is decoded, then the Plug and Play expansion cards enter into a configuration mode. Once in configuration mode, the cards enter into a SLEEP state. Proceeding now to step 104, a command WAKE[CSN] is asserted with the value of CSN equal to 0. This causes the expansion cards to transition from the SLEEP state to an ISOLATION state, and to initialize a serial identifier/resource data pointer. Because all of the expansion cards respond to the same I/O port addresses, a unique number provided on each card is used to distinguish the Plug and Play expansion cards. This unique number is also referred to as the serial identifier, which is a 72-bit number composed of two 32-bit fields and an 8-bit checksum. The first 32-bit field is typically the vendor identifier, while the second 32-bit field can be any value, such as the card serial number, as long as the first and second 32-bit fields represent a number that is unique to that expansion card. The 8-bit checksum is used to ensure that no conflicts have occurred while reading the device identifier information. Each expansion card writes its serial identifier into a serial isolation register, whose contents are outputted one bit at a time. After the expansion card has been properly placed into the ISOLATION state, control proceeds to step 106, where the expansion cards are isolated in an isolation process. Step 106 is shown in more detail in FIG. 2.
Referring now to FIG. 2, a flow diagram of the Plug and Play ISA expansion card isolation is shown. Each expansion card expects 72 pairs of I/O read accesses to the READ.sub.-- DATA port. Each expansion card responds to these reads depending on the value of each bit of the 72-bit serial identifier, which is serially outputted one bit at a time, starting at the least significant bit of the serial identifier. In step 200, the first bit is obtained from the serial isolation register. Next, in step 202, it is determined if the current bit of the serial identifier is a 1. If so, the expansion card writes the value 0.times.55 onto a data bus SD[7:0] in step 204. It is noted that more than one expansion card can drive the data bus SD[7:0] with the value 0.times.55 at the same time. If the current bit of the serial identifier is a 0, then control proceeds to step 206, where the expansion card(s) tristate the output drivers connected to data bus SD[7:0]. For those expansion cards whose current serial identifier bit is 0, control next proceeds from step 206 to step 208, where the expansion card(s) determine if the data bus SD[1:0] is equal to the binary value 01. If so, that would indicate that at least one other expansion card on the ISA bus is driving the value 0.times.55 onto the data bus D[7:0]. Control stays in step 208 until a second I/O read is performed to the same location in the serial isolation register. Thus, for each bit in the serial isolation register, two reads are performed on that bit. Each of these two reads is referred to as a phase of the isolation register read cycle during the isolation process. When the second read occurs, control proceeds from step 208 to step 212 for those expansion card(s) where the current serial identifier bit is equal to zero. If in step 208 it is determined that the data bus SD[1:0] is not equal to the binary value 01, then control proceeds to step 214 when the second I/O read occurs. For these particular expansion cards, their output drivers remain tristated. For the expansion card(s) whose current serial identifier bit is a 1, control proceeds from step 204 to step 210 when the second I/O read occurs. In step 210, the expansion card(s) that drove the value 0.times.55 onto the data bus SD[7:0] in step 204 now drive the value 0.times.AA onto the data bus SD[7:0]. In step 212, the expansion card(s) with the tristated data outputs determines if the data bus SD[1:0] contains the binary value 10. If so, control proceeds to step 216. This indicates that at least one other expansion card contains the value 1 in the current bit of its serial identifier, and thus has driven the data values 0.times.55 and 0.times.AA onto the data bus SD[7:0] in the first and second I/O read cycles, respectively. Therefore, the expansion card(s) that contain the value 0 in the current bit of its serial identifier "loses out" in the current iteration of card isolation process. These cards are put into the SLEEP state in step 216, and will participate only in future iterations of the isolation process. The expansion cards that are placed into the SLEEP state in step 216 are not activated until the command WAKE[0] is asserted again.
In step 212, if it is determined that the data bus SD[1:0] is not equal to the binary value 10, which indicates that no other expansion card is driving the value 0.times.AA onto the data bus SD[7:0], then control proceeds to step 214. In step 214 it is determined if all 72 bits of the serial identifier have been read. If not, control proceeds from step 214 to step 218, where the next serial identifier bit in each of the expansion cards is fetched. Control proceeds from step 218 back to step 202, where the isolation process is repeated. If in step 214, it is determined that all 72 bits of the serial identifier has been read, which indicates that an expansion card has been isolated, control then returns back to the configuration routine. At this time, only one expansion card should still be active as CSN[0]. All other expansion cards will be in sleep state or will have a different CSN value.
Returning now to FIG. 1, control proceeds from step 106 to step 108, where the isolated expansion card is assigned a unique handle, which is also referred to as the card select number (CSN). The CSN is later used to select the expansion card. Expansion cards that have been assigned a non-zero CSN value will not participate in subsequent iterations of the isolation process in step 106. Once an expansion card is assigned a non-zero CSN value, it can respond to other bus commands. After the CSN is assigned for the expansion card, control proceeds from step 108 to 110, where the system BIOS performs resource data read cycles on the isolated expansion card. The resource data describes all the resource requirements of the Plug and Play ISA expansion card. The resource data includes such items as the Plug and Play version number, the number of logical devices (that is, the number of functions available on the Plug and Play expansion card), the logical device ID, compatible device ID, IRQ format, DMA format, I/O port descriptor, fixed location I/O port descriptor, memory range descriptor, identifier string and various other information. The resource data, along with the serial identifier described earlier in step 106, are conventionally stored in a serial EEPROM, which is typically 2K bits in size. The expansion card resource data is initially read into a resource data register located on the expansion card. After 8 bits have been loaded into the resource data register, a status flag on the expansion card is set indicating that the next byte of resource data is ready to be outputted. Thus, the system BIOS will read the resource data one byte at a time from the resource data register. This process is repeated until all the resource data has been read, in which case, control proceeds to step 112, where it is determined if all the Plug and Play expansion cards have been accessed. If not, control returns to step 104, where the configuration routine is reiterated. If all the cards have been accessed, then control proceeds to step 114.
In step 114, the system resources are assigned to each expansion card. For those expansion cards with more than one logical device, each logical device is assigned resources separately. Configuration registers are located on each expansion card for configuring the card's standard ISA resource usage for each logical device. To program the configuration registers, the system BIOS sends a command WAKE[CSN], along with write data to set the desired CSN. The selected expansion card enters into a CONFIG state, and all other expansion cards are forced into a SLEEP state. Next, a logical device number is written to the logical device number register to select the device that is to be programmed. After the proper logical device is selected, the configuration registers are written with the proper configuration values. Thus, memory configuration, I/O space configuration, interrupt request level configuration and DMA channel configuration are performed for each logical device. After the system resources for a logical device are assigned, the logical device is activated on the ISA bus. After all the configuration registers on an expansion card are programmed, the expansion card is placed into the WAIT FOR KEY state. Thus, if it is desired at a later time to access the Plug and Play configuration registers, the initiation key can be issued by the system BIOS to access the desired expansion card. It is noted that the Plug and Play registers can be reprogrammed even in the operating system environment. This is desirable for docking stations, as well as for computer systems that support hot insertion capability and power management. After all the expansion cards have been configured and all the logical devices have been activated, the system BIOS exits the Plug and Play configuration routine, and the standard POST procedure is executed.
The preceding describes the general steps in which Plug and Play ISA expansion cards are configured. Depending upon the type of computer system, the configuration algorithm may be different. For a more complete description of Plug and Play ISA systems, refer to Plug and Play ISA Specification (1994), Intel Corporation and Microsoft Corporation; and Plug and Play BIOS Specification (1993), Compaq Computer Corporation, Phoenix Technologies Ltd. and Intel Corporation. Both specifications are hereby incorporated by reference.
Generally, when the Plug and Play expansion cards are connected to the ISA bus, the serial EEPROM for storage of the serial identifier and Plug and Play resource data is required. However, in certain cases, the functions and logic of the expansion card may be located on the system board of the computer. In this location, the system BIOS, which is specific to the system board, will know that the functions are present. However, for full compatibility with Plug and Play, a serial EEPROM will still be required to conform to the Plug and Play protocol. This serial EEPROM adds cost to the system and appears unnecessary as the system BIOS or other storage device could readily contain the serial identifier and resource data needed for Plug and Play compatibility. But the serial EEPROM has nonetheless been considered necessary for Plug and Play compatibility, increasing system cost. Removal of the serial EEPROM is thus desirable while retaining Plug and Play compatibility.